<%@page import="cn.jflow.common.model.M2mModel"%>
<%@ page language="java" isELIgnored="false" import="java.util.*"
	pageEncoding="utf-8"%>
<%@page import="cn.jflow.common.model.SingleAttachmentUploadModel"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" 
	+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	
	M2mModel m2mModel = new M2mModel(request, response);
	m2mModel.loadData();
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>多对多</title>
    <script src="<%=basePath %>WF/Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <link href="<%=basePath %>WF/Scripts/slideBox/style/jquery.slideBox.css" rel="stylesheet" type="text/css" />
  	<script src="<%=basePath %>WF/Scripts/slideBox/jquery.slideBox.min.js" type="text/javascript"></script>

	<style type="text/css">
      body
      {
          font-size: smaller;
      }
  </style>
  <script language="javascript">
      var isChange = false;
      function SaveM2M() {

          if (isChange == false)
              return;
          var btn = document.getElementById('Button1');
          btn.click();
          isChange = false;
      }

      function TROver(ctrl) {
          ctrl.style.backgroundColor = 'LightSteelBlue';
      }
      function TROut(ctrl) {
          ctrl.style.backgroundColor = 'white';
      }
      function Del(id, ens) {
          if (window.confirm('您确定要执行删除吗？') == false)
              return;
          var url = 'Do.jsp?DoType=DelDtl&OID=' + id + '&EnsName=' + ens;
          var b = window.showModalDialog(url, 'ass', 'dialogHeight: 400px; dialogWidth: 600px;center: yes; help: no');
          window.location.href = window.location.href;
      }

      function GroupBarClick(gID) {
          var alt = document.getElementById('I' + gID).alert;
           if (alt==null) {
		            alt = 'Max';
		        }
		        var sta = 'block';
		        if (alt == 'Max') {
		            sta = 'block';
		            alt = 'Min';
		        } else {
		            sta = 'none';
		            alt = 'Max';
		        }
		        document.getElementById('I' + gID).src = '../Img/' + alt + '.gif';
		        document.getElementById('I' + gID).alert = alt;
		        document.getElementById('TR' + gID).style.display = sta;
      }
  </script>
  <style type="text/css">
      .HBtn
      {
          width: 1px;
          height: 1px;
          display: none;
      }
      
      td
      {
          border: 0.5px solid #D6DDE6;
          padding: 0px;
          text-align: left;
          background-color: #FFFFFF;
          color: #333333;
          margin: 0px;
          font-size: 12px;
      }
      th, .Title
      {
          font-size: 12px;
          border: 1px solid #C2D5E3;
          text-align: center;
          color: #336699;
          white-space: nowrap;
          padding: 0px;
          background-color: InfoBackground;
      }
      .Title:hover
      {
          cursor:pointer;
      }
      .ckbgroup
      {
          cursor: default;
      }
      .ckbgroup:hover
      {
          cursor:default;
      }
  </style>
  <script language="JavaScript" src="<%=basePath %>WF/Comm/JScript.js"></script>
  <base target="_self" />
    <script language="javascript">
	    function M2MMSave(){
			$.ajax({
					cache: true,
					type: "POST",
					url:"WF/CCForm/M2MSave.do",
					data:$('#m2m_form').serialize(),
				});
		}
    </script>
</head>
<body topmargin="0" leftmargin="0" onkeypress="Esc()" style="font-size: smaller">
	<form id="m2m_form" method="post">
		<input type="hidden" name="FK_MapData" value="<%=m2mModel.getFK_MapData()%>"/>
		<input type="hidden" name="OID" value="<%=m2mModel.getOID()%>"/>
		<input type="hidden" name="NoOfObj" value="<%=m2mModel.getNoOfObj()%>"/>
		<%=m2mModel.Pub1.toString() %>
		<input type="button" id="Button1" class="Btn" value="保存" <%=m2mModel.getVisible()%> onclick="M2MMSave();"/>
	</form>
</body>
</html>
